-- GENERATED SPELL FOR [Twilight Avenger] --


function spell0_11880(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_11880', 586, 1)
end

function spell1_11880(pUnit, Event) --@Vengeance,Self--
pUnit:FullCastSpellOnTarget(8602,pUnit)
pUnit:RegisterEvent('Sorts_11880', 10257, 1)
end

function Sorts_11880(pUnit, Event)
local choix_sorts_11880 = math.random(0, 1)
if choix_sorts_11880 == 0 then
pUnit:RegisterEvent('spell0_11880', 1, 1)
end
if choix_sorts_11880 == 1 then
pUnit:RegisterEvent('spell1_11880', 1, 1)
end
end

function mob11880_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11880', math.random(1500, 3000), 1)
end

function mob11880_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11880_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11880_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11880, 1, 'mob11880_Action')
RegisterUnitEvent(11880, 2, 'mob11880_Leave')
RegisterUnitEvent(11880, 3, 'mob11880_Kill')
RegisterUnitEvent(11880, 4, 'mob11880_Die')
